<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'user-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'email'); ?>
		<?php echo $form->textField($model,'email',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'password'); ?>
		<?php echo $form->passwordField($model,'password',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'password'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'_password2'); ?>
		<?php echo $form->passwordField($model,'_password2',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'_password2'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'first_name'); ?>
		<?php echo $form->textField($model,'first_name',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'first_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'last_name'); ?>
		<?php echo $form->textField($model,'last_name',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'last_name'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'phone'); ?>
		<?php echo $form->textField($model,'phone',array('size'=>11,'maxlength'=>11)); ?>
		<?php echo $form->error($model,'phone'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'city'); ?>
		<?php echo $form->textField($model,'city',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'city'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'role'); ?>
		<?php echo $form->dropDownList(
        		$model, 
        		'role', 
        		User::getRoles()); ?>
		<?php echo $form->error($model,'role'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'education'); ?>
		<?php echo $form->dropDownList(
        		$model, 
        		'education', 
        		User::getEductionData(),
        		array('prompt'=>' - Select - ')); ?>
		<?php echo $form->error($model,'education'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'sex'); ?>
		<?php echo $form->dropDownList(
        		$model, 
        		'sex', 
        		User::getSexData(),
        		array('prompt'=>' - Select - ')); ?>
		<?php echo $form->error($model,'sex'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'birthday'); ?>
		<?php echo $form->dropDownList(
        		$model, 
        		'birthday', 
        		User::getBirthdayData(),
        		array('prompt'=>' - Select - ')); ?>
		<?php echo $form->error($model,'birthday'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'is_checked'); ?>
		<?php echo $form->checkBox($model,'is_checked'); ?>
		<?php echo $form->error($model,'is_checked'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'is_subscribed'); ?>
		<?php echo $form->checkBox($model,'is_subscribed'); ?>
		<?php echo $form->error($model,'is_subscribed'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'balance'); ?>
		<?php echo $form->textField($model,'balance'); ?>
		<?php echo $form->error($model,'balance'); ?>
	</div>
	
	<?php if(!$model->isNewRecord): ?>
		<div class="row">
			<?php echo $form->labelEx($model,'created_at'); ?>
			<?php echo $model->created_at; ?>
		</div>
		
		<div class="row">
			<?php echo $form->labelEx($model,'check_code'); ?>
			<?php echo $model->check_code ?>
		</div>
	
		<div class="row">
			<?php echo $form->labelEx($model,'personal_key'); ?>
			<?php echo $model->personal_key ?>
		</div>
	<?php endif;?>

<?php /*
	<div class="row">
		<?php echo $form->labelEx($model,'pockets'); ?>
		<?php echo $form->textField($model,'pockets'); ?>
		<?php echo $form->error($model,'pockets'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'referal_owner_id'); ?>
		<?php echo $form->textField($model,'referal_owner_id'); ?>
		<?php echo $form->error($model,'referal_owner_id'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'ipaddress'); ?>
		<?php echo $form->textField($model,'ipaddress',array('size'=>16,'maxlength'=>16)); ?>
		<?php echo $form->error($model,'ipaddress'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'cookie_id'); ?>
		<?php echo $form->textField($model,'cookie_id',array('size'=>40,'maxlength'=>40)); ?>
		<?php echo $form->error($model,'cookie_id'); ?>
	</div>
*/?>
	
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->